import pytest
from pathlib import Path

@pytest.fixture(scope="session")
def config_dir(tmp_path_factory):
    """临时配置目录"""
    dir = tmp_path_factory.mktemp("config")
    yield dir
    # 测试后自动清理